package com.yax.mickey.controller;

import com.yax.mickey.common.result.Result;
import com.yax.mickey.entity.Feedback;
import com.yax.mickey.service.FeedbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@ResponseBody
@RestController
@RequestMapping("/feedback")
@Api(tags = "用户端用户反馈相关接口")
@Slf4j
public class FeedbackController {
    @Autowired
    private FeedbackService feedbackService;

    @GetMapping("/getAllFeedback")
    @ApiOperation("获取所有用户反馈信息")
    public Result<List<Feedback>> getAllFeedback() {
        List<Feedback> feedbackList = feedbackService.getAllFeedback();
        return Result.success(feedbackList);
    }
}